package de.jmda.mproc.swingui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.WindowConstants;

import de.jmda.util.gui.awt.graphics.IconProvider;


public abstract class VisualProcessor
{
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		try
		{
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch (Exception e)
		{
			System.err.println(
					"failure setting system look and feel, aborting\n" + e);
			return;
		}

		EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				JFrame jFrame = new JFrame("VisualProcessor for jMDA Models");
				
				jFrame.setIconImage(IconProvider.getIconJMDA().getImage());

				jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

				jFrame.add(new JPanelVisualProcessorConfiguration(
				    new JPanelVisualProcessorConfigurationModel()));

				jFrame.pack();
				jFrame.setLocationRelativeTo(null);
				jFrame.setVisible(true);
			}
		});
	}
}